3.57 \(\int \frac{\sin (e+f x)}{a+b \tan ^2(e+f x)} \, dx\)

Optimal. Leaf size=60 \[ -\frac{\cos (e+f x)}{f (a-b)}-\frac{\sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{f (a-b)^{3/2}} \]

[Out]

-((Sqrt[b]*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/((a - b)^(3/2)*f)) - Cos[e + f*x]/((a - b)*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0550307, antiderivative size = 60, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3664, 325, 205} \[ -\frac{\cos (e+f x)}{f (a-b)}-\frac{\sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{f (a-b)^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]/(a + b*Tan[e + f*x]^2),x]

[Out]

-((Sqrt[b]*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/((a - b)^(3/2)*f)) - Cos[e + f*x]/((a - b)*f)

Rule 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 325

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^(p + 1))/(a*
c*(m + 1)), x] - Dist[(b*(m + n*(p + 1) + 1))/(a*c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sin (e+f x)}{a+b \tan ^2(e+f x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{x^2 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac{\cos (e+f x)}{(a-b) f}-\frac{b \operatorname{Subst}\left (\int \frac{1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{(a-b) f}\\ &=-\frac{\sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{(a-b)^{3/2} f}-\frac{\cos (e+f x)}{(a-b) f}\\ \end{align*}

Mathematica [B]  time = 0.260307, size = 121, normalized size = 2.02 \[ \frac{(b-a) \cos (e+f x)+\sqrt{b} \sqrt{a-b} \tan ^{-1}\left (\frac{\sqrt{a-b}-\sqrt{a} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{b}}\right )+\sqrt{b} \sqrt{a-b} \tan ^{-1}\left (\frac{\sqrt{a-b}+\sqrt{a} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{b}}\right )}{f (a-b)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]/(a + b*Tan[e + f*x]^2),x]

[Out]

(Sqrt[a - b]*Sqrt[b]*ArcTan[(Sqrt[a - b] - Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]] + Sqrt[a - b]*Sqrt[b]*ArcTan[(Sq
rt[a - b] + Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]] + (-a + b)*Cos[e + f*x])/((a - b)^2*f)

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 63, normalized size = 1.1 \begin{align*} -{\frac{\cos \left ( fx+e \right ) }{ \left ( a-b \right ) f}}+{\frac{b}{ \left ( a-b \right ) f}\arctan \left ({ \left ( a-b \right ) \cos \left ( fx+e \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)/(a+b*tan(f*x+e)^2),x)

[Out]

-cos(f*x+e)/(a-b)/f+1/f*b/(a-b)/(b*(a-b))^(1/2)*arctan((a-b)*cos(f*x+e)/(b*(a-b))^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.78239, size = 350, normalized size = 5.83 \begin{align*} \left [-\frac{\sqrt{-\frac{b}{a - b}} \log \left (-\frac{{\left (a - b\right )} \cos \left (f x + e\right )^{2} - 2 \,{\left (a - b\right )} \sqrt{-\frac{b}{a - b}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right ) + 2 \, \cos \left (f x + e\right )}{2 \,{\left (a - b\right )} f}, -\frac{\sqrt{\frac{b}{a - b}} \arctan \left (-\frac{{\left (a - b\right )} \sqrt{\frac{b}{a - b}} \cos \left (f x + e\right )}{b}\right ) + \cos \left (f x + e\right )}{{\left (a - b\right )} f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)^2),x, algorithm="fricas")

[Out]

[-1/2*(sqrt(-b/(a - b))*log(-((a - b)*cos(f*x + e)^2 - 2*(a - b)*sqrt(-b/(a - b))*cos(f*x + e) - b)/((a - b)*c
os(f*x + e)^2 + b)) + 2*cos(f*x + e))/((a - b)*f), -(sqrt(b/(a - b))*arctan(-(a - b)*sqrt(b/(a - b))*cos(f*x +
 e)/b) + cos(f*x + e))/((a - b)*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin{\left (e + f x \right )}}{a + b \tan ^{2}{\left (e + f x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)**2),x)

[Out]

Integral(sin(e + f*x)/(a + b*tan(e + f*x)**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.40835, size = 109, normalized size = 1.82 \begin{align*} -\frac{f \cos \left (f x + e\right )}{a f^{2} - b f^{2}} + \frac{b \arctan \left (\frac{a \cos \left (f x + e\right ) - b \cos \left (f x + e\right )}{\sqrt{a b - b^{2}}}\right )}{\sqrt{a b - b^{2}}{\left (a - b\right )} f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)^2),x, algorithm="giac")

[Out]

-f*cos(f*x + e)/(a*f^2 - b*f^2) + b*arctan((a*cos(f*x + e) - b*cos(f*x + e))/sqrt(a*b - b^2))/(sqrt(a*b - b^2)
*(a - b)*f)